<include file="Public:head"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Topic/lists')}">话题管理</a></li>
                    <li class="active">话题列表</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="header smaller lighter blue">
                                    <div class="nav-search col-xs-10" id="nav-search">
                                        <form class="form-search" method="get">
                                            <div class="search_area">
                                                <select name="cat_id" autocomplete="off">
                                                    <option value="0">请选择话题分类</option>
                                                    <foreach name="topic_cats" item="row">
                                                        <option value="{$row.id}"<if condition="$row.id eq $cat_id">selected</if>>
                                                        {$row.name}                                                
                                                        </option>
                                                    </foreach>
                                                </select>

                                                <select name="easy_id" autocomplete="off">
                                                    <option value="0">请选择难易程度</option>
                                                    <foreach name="topic_easy" item="row">
                                                        <option value="{$row.id}"<if condition="$row.id eq $easy_id">selected</if>>
                                                        {$row.name}                                                
                                                        </option>
                                                    </foreach>
                                                </select>
                                                <input class="form-control search-query" type="text" name="keyword" autocomplete="off"  placeholder="请输入话题名称" value="{$Think.get.keyword}">
                                                <button class="btn btn-purple btn-sm" type="submit">搜 索 <i class="icon_search icon-on-right bigger-110"></i></button>
                                            </div>
                                        </form>
                                    </div>
                                    <div class='cl'></div>
                                </div>
                                <notempty name='lists'>
                                    <div class="table-responsive">
                                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                            <thead>
                                                <tr>
                                                    <th class="center" width='45px'>
                                                        <label>
                                                            <input type="checkbox" class="ace"  autocomplete="off"/>
                                                            <span class="lbl"></span>
                                                        </label>
                                                    </th>
                                                    <th width='45px' class="center">序号</th>
                                                    <th width="180px">话题名称</th>
                                                    <th width='45px'>logo</th>
                                                    <th width='85px'>标签</th>
                                                    <th width="60px">话题分类</th>
                                                    <th width="55px">难易程度</th>
                                                    <th width="90px">话题来源</th>
                                                    <th width="100px">关键字</th>
                                                    <th width="45px">排序</th>
                                                    <th width="75px">是否开启</th>
                                                    <th width="60px"><i class="icon-time bigger-110 hidden-480"></i>时间</th>
                                                    <th width="50px">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            <foreach name="lists" item="row">
                                                <tr>
                                                    <td class="center">
                                                        <label><input type="checkbox" class="ace" name="ids" value="{$row.id}" autocomplete="off" /><span class="lbl"></span></label>
                                                    </td>
                                                    <td class="center">{$row.id}</td>
                                                    <td><a href="__APP__/js/{$row.id}.html" target="_blank">{$row.name|msubstr=0,32,'utf-8',true}</a></td>
                                                    <td><a href="{:U('Topic/detail',array('id'=>$row['id']))}"><img src="{$row.id|getModalsLogo=###,'middle','js'}"style="width:45px;height:45px"></a></td>
                                                    <td>{$row.tags}</td>
                                                    <td>{$row.cat_id|getSingleField=###=###,'topic_dictionary','name'}</td>
                                                    <td>{$row.easy_id|getSingleField=###=###,'topic_dictionary','name'}</td>
                                                    <td><a href="{$row.source}" target="_blank">{$row.source}</a></td>
                                                    <td>{$row.keywords|getHighlight=###,$keyword}</td>
                                                    <td><a onclick="changeOrd($(this), 'js', '{$row.id}')">{$row.ord}</a></td>
                                                    <td id="is_check_{$row.id}"><a onclick="yes('{$row.id}', 'js', 'is_check')"><if condition="$row.is_check eq 1">是<else/><span style="color:red">否</span></if></a></td>
                                                    <td>{$row.addtime|date="m-d H:i",###}</td>
                                                    <td class="action-buttons">
                                                        <a class="purple" data-rel="tooltip" data-original-title="演示地址" href="{$row.id|getTopicDemo}" target="_blank"><i class="icon-facetime-video bigger-130"></i></a>
                                                        <a class="green" href="{:U('Topic/detail',array('id'=>$row['id']))}" data-rel="tooltip" data-original-title="编辑"><i class="icon-pencil bigger-130"></i></a>
                                                    </td>
                                                </tr>
                                            </foreach>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div id="grid-pager" class="ui-state-default  ui-corner-bottom" dir="ltr">
                                        <table width='100%' data-table='Topic'  id='modal_del_table'>
                                            <tr>
                                                <td>
                                                    <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                                        <a class="purple" href="{:U('Topic/detail')}" data-rel="tooltip" data-original-title="添加话题">
                                                            <i class="icon-plus-sign bigger-130"></i>
                                                        </a>
                                                        <a class="red" data-toggle="modal" onclick="targetDelTable(0, -1)"  data-rel="tooltip" data-original-title="批量删除">
                                                            <i class="icon-trash bigger-130"></i>
                                                        </a>
                                                    </div>
                                                </td>
                                                <td class='td_pager'><div class='pager'>{$page}</div></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <else/>
                                    <p class='noempty'>没有符合条件的记录！</p>
                                </notempty>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<include file="Public:del" />
<include file="Public:state" />
<include file="Public:foot" />